<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
				xmlns:ui="http://java.sun.com/jsf/facelets"
				xmlns:h="http://java.sun.com/jsf/html"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:s="http://jboss.com/products/seam/taglib"
				xmlns:rich="http://richfaces.org/rich"
				xmlns:a4j="http://richfaces.org/a4j"
				template="../template.xhtml">

	<!-- content -->
	<ui:define name="content">
		<h:form id="formdetalhes">
		<h:messages styleClass="message" id="globalMessages" />
		<rich:panel id="paneldetalhes">
			<f:facet name="header">Compra</f:facet>
			
	        <h:panelGrid id="griddetalhes" columns="2">
	        
                <h:outputText value="Data:"/>
                <rich:calendar id="dataCompradt" locale="pt_BR" datePattern="dd/MM/yyyy"
                	value="#{compraBean.compra.data}" readonly="true" disabled="true" />
	        
	            <h:outputText value="Supermercado:"/>
                <h:inputText id="supermercado" value="#{compraBean.compra.supermercado.descricao}"
                	size="30" readonly="true" disabled="true" />
                
	            <h:outputText value="Produto:"/>
                <h:inputText id="produto" value="#{compraBean.compra.produto.descricao}"
                	size="30" readonly="true" disabled="true" />
                
                <h:outputText value="Preco:"/>
                <h:inputText id="preco" maxlength="5" value="#{compraBean.compra.preco}" readonly="true" disabled="true">
                	<f:converter converterId="javax.faces.BigDecimal" />
                </h:inputText>
	        </h:panelGrid>
			        
		</rich:panel>
		<br />
		<div class="actionButtons">
			<h:commandButton id="excluir" value="Excluir"
				action="#{compraBean.delete}"
				/>
			<h:commandButton id="cancelar" value="Cancelar" action="ok" immediate="true" />
		</div>
		</h:form>
	</ui:define>
</ui:composition>
